import React from 'react';
import { Input } from 'antd';

const ChargeSearchInput = ({ label, value, onChange }) => {
    const handleInputChange = (e) => {
        onChange(e.target.value);
    };

    return (
        <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
            <span style={{ minWidth: 60 }}>{label}:</span>
            <Input
                style={{width: 180}}
                value={value || ''}
                onChange={handleInputChange}
                allowClear
            />
        </div>
    );
};

export default React.memo(ChargeSearchInput);